<!--
  ~ This program is part of the OpenLMIS logistics management information system platform software.
  ~ Copyright © 2013 VillageReach
  ~
  ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
  ~  
  ~ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
  ~ You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses.  For additional information contact info@OpenLMIS.org. 
  -->

<div>
    <h2 id="regimenTemplateHeader" openlmis-message="label.admin.configure.regimenTemplate"></h2>

    <div id="saveSuccessMsgDiv" class="alert alert-success" ng-bind="message" ng-show="message"></div>
    <div>
        <table id="configureProgramRegimensTable" class="configure-program-table table table-striped table-bordered">
            <thead>
            <tr>
                <th openlmis-message="program.header"></th>
                <th></th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="program in programs">
                <td ng-bind="program.name"></td>
                <td>
                    <ng-switch on="program.regimenTemplateConfigured">
            <span ng-switch-when="true">
              <i class="icon-ok"></i> <span openlmis-message="template.configured"></span>
              (<a href="" id="{{program.name}}" ng-click="configure(program.id)" openlmis-message="link.edit"></a>)
            </span>
            <span ng-switch-default>
              <a href="" id="{{program.name}}" ng-click="configure(program.id)" class="btn btn-primary">
                  <i class="icon-cog"></i> &nbsp;<span openlmis-message="template.configure"></span>
              </a>
            </span>
                    </ng-switch>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
